import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

import java.text.ParseException;

class JianCha {
 @DisplayName("等价类")
 @ParameterizedTest
 @CsvSource({
         "20220410150000,20220409000000,通话时间输入错误，请重新输入。",
         "20220328031050,20220328013030,通话时间输入错误，请重新输入。",
         "20221031025830,20221031014059,通话时间输入错误，请重新输入。",
         "20220404191700,20220404191730,0.05",
         "20220328015959,20220328030030,5.10",
         "20221031020000,20221031020030,0.05",
         "20220404191700,20220404192730,0.55",
         "20220328015559,20220328031530,7.00",
         "20220505050505,20220505151515,60.10",
         "20220329000000,20220329050000,29.00",
         "20221024232323,20221025030303,21.00",
         "20220202020202,20220202220203,119.10",
         "20220329000000,2020330000000,通话时间输入错误，请重新输入。"


 })
 void test_csv_file_source1(String a,String b, String expected) throws ParseException {
  Charge charge = new Charge(a,b);
  assertEquals(expected, charge.ChargeMoney());
 }
}